import * as API from "@/api/axios";

export default {

    //获取积分统计数
    getPointsTotal: () => {
        return API.axiosGetAPI('/manage/point-rules/statistics')
    },

    //获取积分记录列表
    getPointRecords: () => {
        // const url = util.replacePageNumAndSize(`/manage/point-rules/list`, page)
        return API.axiosGetAPI('/manage/point-rules/list')
    },

    //修改状态
    modifyState: params => {
        const headers = {'lang-key': params.state == 1 ? 'Station_Open' : 'Station_Close'}
        return API.axiosPutAPI('/manage/point-rules/state', params, headers)
    },

    //修改积分
    modifyPoint: params => {
        const headers = {'lang-key': 'Users_Edit'}
        return API.axiosPutAPI('/manage/point-rules/point', params, headers)
    },
}
